package io.xccit.log.annotation;

import io.xccit.log.enums.BusinessType;
import io.xccit.log.enums.OperatorType;

import java.lang.annotation.*;

/**
 * @author CH_ywx
 * @date 2023-06-28
 * @description 操作日志注解
 */
@Target({ElementType.PARAMETER,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Log {
    /**
     * 模块(默认空)
     */
    public String title() default "";

    /**
     * 功能(默认OTHER)
     */
    public BusinessType businessType() default BusinessType.OTHER;

    /**
     * 操作用户类型(角色 默认MANAGE)
     */
    public OperatorType operatorType() default OperatorType.MANAGE;

    /**
     * 是否保存请求的参数(默认true)
     */
    public boolean isSaveRequestData() default true;

    /**
     * 是否保存响应的参数(默认true)
     */
    public boolean isSaveResponseData() default true;
}
